tests/core: Really pick C.UTF-8 locale
authorDan Nicholson <nicholson@endlessm.com>
Tue, 21 Jan 2020 17:25:17 +0000 (10:25 -0700)
committerDan Nicholson <nicholson@endlessm.com>
Tue, 21 Jan 2020 17:29:41 +0000 (10:29 -0700)
commit5135a1e58ade2bfafc8c1fda359540eafd72531e
treed5beb4b0838da935c52b9c74d61ea0bfcd947168
parent20d84f40faa0dd5218b2f494c7c96c2939d35339
tests/core: Really pick C.UTF-8 locale

The case-ignoring regex `^(C|en_US)` will match any locale that starts
with `c`. On my system this is `ca_AD.utf8`, which breaks the test
suite. Instead, use a single regex that includes the joining `.` rather
than 2 separate regexes. This also changes `head` to use the `-n`
option, which has been preferred for at least 10 years in the coreutils
version and is supported by busybox as well.
tests/libtest-core.sh